<div class="view">

    <h2> 
        <?php
        echo CHtml::link(CHtml::encode($data->name), array('/product/view', 'id' => $data->id));
        ?>
    </h2>

    <div style="float:left;margin-right:40px;">
        <?php
        echo CHtml::image(Yii::app()->baseUrl . '/images/' . $data->image);
        ?>
    </div>
    <div>
        <b><?php echo CHtml::encode($data->getAttributeLabel('price')); ?>:</b>
        <?php echo CHtml::encode($data->price) . " VNĐ"; ?>
        <br />
        <b><?php echo CHtml::encode($data->getAttributeLabel('amount')); ?>:</b>
        <?php echo CHtml::encode($data->amount); ?>
        <br />
        <b><?php echo CHtml::encode($data->getAttributeLabel('last_update')); ?>:</b>
        <?php echo CHtml::encode(Yii::app()->dateFormatter->formatDateTime($data->last_update, 'medium', false)); ?>
        <br />
        <b><?php echo CHtml::encode($data->getAttributeLabel('manufacturer_id')); ?>:</b>
        <?php echo CHtml::encode($data->manufacturer->name); ?>
        <br />
        <b><?php echo CHtml::encode($data->getAttributeLabel('category_id')); ?>:</b>
        <?php echo CHtml::encode($data->category->name); ?>
        <br />
        <b><?php echo CHtml::encode($data->getAttributeLabel('description')); ?>:</b>
        <?php echo CHtml::encode($data->description); ?>
    </div>
    <hr />
    <?php
        if (!Yii::app()->user->isGuest) {
            $this->renderPartial('/product/addToCart', array('model' => $data));
        }
    ?>
</div>